package com.icbc.digitalwallet.pojo.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author tx
 * @since 2021-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@ApiModel(value="TransFlow对象", description="")
public class TransFlow implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id 银行，数字钱包或卡片")
    private String userId;

    @ApiModelProperty(value = "交易对象id")
    private String transObj;

    @ApiModelProperty(value = "交易对象昵称")
    private String transObjName;

    @ApiModelProperty(value = "交易类型 0充值 1提现 2转入 3转出")
    private Integer transType;

    /**
     * 扩展字段 交易类型名称
     */
    @ApiModelProperty(value = "交易类型名称 0充值 1提现 2转入 3转出")
    @TableField(exist = false)
    private String transTypeName;

    @ApiModelProperty(value = "交易金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "交易单号")
    private String transNo;

    @ApiModelProperty(value = "交易结果 0失败，1成功")
    private Boolean transResult;

    @ApiModelProperty(value = "备注")
    private String memo;

    @ApiModelProperty(value = "交易日期的年月")
    @TableField(exist = false)
    private String yearAndMonth;


    @ApiModelProperty(value = "交易日期的年")
    @TableField(exist = false)
    private Integer year;

    @ApiModelProperty(value = "交易日期的月")
    @TableField(exist = false)
    private Integer month;

    @ApiModelProperty(value = "交易日期的日子")
    @TableField(exist = false)
    private Integer days;

    @ApiModelProperty(value = "交易日期的星期")
    @TableField(exist = false)
    private String week;

    @ApiModelProperty(value = "返回的金额形式")
    @TableField(exist = false)
    private String resultAmount;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
